Field of the Invention
The present invention relates to a method, apparatus, and system for switching a transport stream and, more particularly, to an MPEG-2 Transport Stream (TS) switching apparatus and method for switching and outputting a single MPEG-2 TS that belong to two or more MPEG-2 TSs output by different encoders and that is selected in response to a switching command from a user.
Discussion of the Related Art
FIG. 1 is a diagram illustrating an example of an in-point and out-point for the switching of an MPEG-2 TS.
Referring to FIG. 1, a conventional MPEG-2 TS switching method includes a TS switching method, that is, a method provided by ISO/IEC 1381-1 MPEG-2 systems. A “switching point of time” is divided into an “in-point” and an “out-point”. The in-point is a point of time at which a new stream may be switched and entered, and the out-point is a point of time at which a stream may switch into an existing stream. In an existing TS switching method, for the seamless and continuous switching of an image as in FIG. 1, after a picture suitable for restriction conditions appears, switching is started using a corresponding point as a switching point of time. The picture suitable for the restriction conditions means that in the case of the out-point, the last picture needs to be an I or P picture on the basis of a Presentation Time Stamp (PTS) and the start of a video stream of a newly replaced stream (e.g., a B stream in FIG. 1) needs to be an I picture. Furthermore, a B picture (i.e., a B picture indicated by dotted lines in the B stream) behind the I picture of the in-point needs to be encoded so that it does not refer video before the in-point. If not, there is a problem in that a decoder may not properly restore the B picture because information about an image referred by the B picture indicated by the dotted lines is unable to be obtained.
FIG. 2 is a diagram illustrating an example in which a plurality of MPEG-2 TSs is connected.
Referring to FIG. 2, in the MPEG-2 TS switching methods provided by ISO/IEC 1381-1 MPEG-2 systems, MPEG-2 TSs corresponding to respective programs have already been produced as shown in FIG. 2, and the TSs of the programs are sequentially connected. Accordingly, as shown in FIG. 2, the first of an advertisement 1 TS that will be switched after a program 1 TS may have been encoded into an Instantaneous Decoding Refresh (IDR) picture. Accordingly, there is no problem because an in-point will become the IDR picture and the B picture indicated by the dotted lines in the B stream of FIG. 1 is not present.
In the case where a plurality of MPEG-2 TSs continues to be received from different encoders, however, there is a problem in that a delay time is too long if switching is performed after an IDR picture is reached at a stream to be switched and entered.
Furthermore, a closed GOP structure may be used to obviate a problem in that a B picture subsequent to the I picture of a stream to be switched and entered cannot be decoded. In general, in broadcasting, the video of a broadcasting program is encoded in an open GOP structure by taking an encoding efficiency viewpoint into consideration. It is however almost impossible to perform encoding in the closed GOP structure only at a point where a stream is expected to be replaced because the setting of an encoder needs to be changed.
Furthermore, two MPEG-2 TSs need to be switched within a short time as much as possible without buffering a plurality of received MPEG-2 TSs. To this end, the I picture of a B stream needs to be input at a point of time at which a P or I picture is started on the basis of a Decoding Time Stamp (DTS) in a stream A.
FIG. 3 is a diagram illustrating an example of an in-point having great delay in the switching of an MPEG-2 TS.
From FIG. 3, it may be seen that after an out-point is searched for, it is difficult to disconnect a stream A because an I picture that first appears in a B stream is input to a P picture of the stream A, and as a result, switching is performed at the moment when the I picture of the B stream is input at the same time as the P or I picture of the stream A is ended. Accordingly, there is a problem in that switching delay time becomes significantly long.
FIG. 4A illustrates an example of the conventional mixed broadcasting of HDTV service and 3DTV service, and FIG. 4B illustrates an example of the conventional mixed broadcasting of HDTV service and multi-channel service.
Referring to FIGS. 4A and 4B, if an HDTV program, a 3D program, and a multi-channel service program are interchangeable with one another and served in a single channel, a problem may occur when MPEG-2 TSs are switched.
Accordingly, there is a need to connect two MPEG-2 TSs to two different MPEG-2 TSs in such a manner that the two MPEG-2 TSs may be restored without a phenomenon in which audio or video is disconnected or broken at a point of time at which the two MPEG-2 TSs are connected to the two different MPEG-2 TSs.